<template>
  <div>
    <el-tree
      ref="tree2"
      :data="data2"
      :props="defaultProps"
      class="filter-tree"
      default-expand-all
    />
  </div>
</template>

<script>
import {subGetTree} from '@/api/subject'

export default {
  data(){
    return{
      defaultProps: {
        children: 'subjects',
        label: 'title'
      },
      data2:{}
    }
  },
  created() {
    subGetTree().then(res=>{
      this.data2=res.data
    })
  },
  methods:{

  }
}
</script>

<style>

</style>
